package org.liveboardgames.agricola.access.hibernate;

import java.util.Set;

import org.liveboardgames.agricola.access.IPlayerDao;
import org.liveboardgames.agricola.domain.player.Player;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

public class PlayerHibernateDao extends HibernateDaoSupport implements IPlayerDao {

  public void save(Player player) {
    getHibernateTemplate().saveOrUpdate(player);
  }

  public void save(Set<Player> players) {
    for (Player player : players) {
      getHibernateTemplate().saveOrUpdate(player);
    }
  }

}
